package net.webservice.server;

import net.webservice.Constants;
import net.webservice.entity.Message;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;

@WebService(name = "MessageServicePortType",
        targetNamespace=Constants.SHAREDDATA_NAMESPACE )
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
public interface MessageService {

    @WebMethod(operationName = "getMessage")
    public Message getMessage(@WebParam(name = "id")int id);

    @WebMethod(operationName = "postMessage")
    public Message postMessage(@WebParam(name = "message")Message message);

}
